package com.xuhuan.practice.dto.user;

import com.xuhuan.practice.validator.group.AddGroup;
import com.xuhuan.practice.validator.group.UpdateGroup;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

/**
 * @author: huan.xu
 * @create: 2024/6/13 22:08
 * @description: 用户注册dto
 **/
@Data
public class UserRegisterDTO {

  @Pattern(regexp = "^\\S{5,16}$", groups = AddGroup.class)
  private String username;

  @Pattern(regexp = "^\\S{5,16}$", groups = {AddGroup.class, UpdateGroup.class})
  private String password;
}
